package blockChain

type BlockChainMsg struct {
	Name    string
	Project string
	Version string
	Repo    string
}

type blockChainer interface {
	RunWithChan(chan<- BlockChainMsg)
}

var blockChainMap = make(map[string]blockChainer)

func AddBlockChain(name string, bc blockChainer) {
	blockChainMap[name] = bc
}

func BlockChainMapRun(blockChainMsgCh chan<- BlockChainMsg) {
	for _, bc := range blockChainMap {
		bc.RunWithChan(blockChainMsgCh)
	}
}
